package cn.iocoder.yudao.module.pplan.dal.mysql.quarterproducerecord;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.module.pplan.controller.admin.quarterproducerecord.vo.QuarterProduceRecordPageReqVO;
import cn.iocoder.yudao.module.pplan.dal.dataobject.quarterproducerecord.QuarterProduceRecordDO;
import org.apache.ibatis.annotations.Mapper;

/**
 * 生产计划-生产季度计划记录 Mapper
 *
 * @author yisl
 */
@Mapper
public interface QuarterProduceRecordMapper extends BaseMapperX<QuarterProduceRecordDO> {

    default PageResult<QuarterProduceRecordDO> selectPage(QuarterProduceRecordPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<QuarterProduceRecordDO>()
                .eqIfPresent(QuarterProduceRecordDO::getFlightNo, reqVO.getFlightNo())
                .eqIfPresent(QuarterProduceRecordDO::getDepTime, reqVO.getDepTime())
                .eqIfPresent(QuarterProduceRecordDO::getMarkStatus, reqVO.getMarkStatus())
                .orderByDesc(QuarterProduceRecordDO::getId));
    }

}